﻿using System;
using System.Collections;
using System.Runtime.Remoting.Messaging;
using System.Collections.Generic;
using System.Collections.Specialized;

namespace CCU.Core.Channel
{
    [Serializable]
    public class CCUChannelExtra
    {
        internal const string callContextKey = "__CCU_APPLICATIONCONTEXT";
        internal const string contextHeaderNamespace = "CCU:SZ7THROAD";

        public static CCUChannelExtra GetEntity
        {
            get
            {
                if (CallContext.GetData(callContextKey) == null)
                    CallContext.SetData(callContextKey, new CCUChannelExtra());
                return CallContext.GetData(callContextKey) as CCUChannelExtra;
            }
            set { CallContext.SetData(callContextKey, value); }
        }

        /// <summary>
        /// 模块Key
        /// </summary>
        public string moduleKey { get; set; }

        /// <summary>
        /// 当前用户的UserId
        /// </summary>
        public string userId { get; set; }

        /// <summary>
        /// 当前用户的UserName
        /// </summary>
        public string userName { get; set; }

        /// <summary>
        /// 当前用户的IP
        /// </summary>
        public string clientIP { get; set; }

        /// <summary>
        /// 当前用户的权限（已加密）
        /// </summary>
        public string userConfig { get; set; }

        /// <summary>
        /// 游戏区ID
        /// </summary>
        public string gameZoneId { get; set; }

        /// <summary>
        /// 游戏区名字
        /// </summary>
        public string gameZoneName { get; set; }

        /// <summary>
        /// 目标服务器IP
        /// </summary>
        public string targetServerIp { get; set; }

        /// <summary>
        /// 操作反馈信息
        /// </summary>
        public string output { get; set; }

        /// <summary>
        /// 操作流水号
        /// </summary>
        public string flowId { get; set; }
    }
}
